<template>
  <section class="page">
    <div>
      <div class="w-title">{{ sessionStorageData.orgNm }}{{ sessionStorageData.billstdNm }}</div>
      <div class="horizontal-direction">
        <div class="horizontal-box">
          申请单号：<span>{{ sessionStorageData.orderNo }}</span>
        </div>
        <div class="horizontal-box">
          申请人员：<span>{{ sessionStorageData.grtUserCname }}</span>
        </div>
      </div>
      <div class="horizontal-direction">
        <div class="horizontal-box">
          申请时间：<span>{{ sessionStorageData.sendTime }}</span>
        </div>
      </div>
      <div>
        <table cellspacing="0" cellpadding="0" border="1" class="el-table__header main-table" style="width: 100%; margin-bottom: 3em">
          <thead class="has-gutter">
            <tr class="text-center">
              <th colspan="10"><div>内容</div></th>
              <th colspan="3"><div>部位</div></th>
            </tr>
            <tr class="text-center">
              <th><div>序号</div></th>
              <th><div>订单序</div></th>
              <th><div>订单号码</div></th>
              <th><div>材料编码</div></th>
              <th><div>材料名称</div></th>
              <th><div>型号</div></th>
              <th><div>订单双数</div></th>
              <th><div>需求数</div></th>
              <th><div>厂商</div></th>
              <th><div>部位代码</div></th>
              <th><div>部位名称</div></th>
              <th><div>单位用量</div></th>
              <th><div>LOSS%</div></th>
            </tr>
          </thead>
          <tbody>
            <template v-for="(item, index) in applicationForm.detailList">
              <tr class="text-left" v-if="item.partNm" :key="index">
                <td>
                  <div>{{ item.orderSeq }}</div>
                </td>
                <td>
                  <div>{{ item.seSeq }}</div>
                </td>
                <td>
                  <div>{{ item.seId }}</div>
                </td>
                <td>
                  <div>{{ item.itemNo }}</div>
                </td>
                <td>
                  <div class="text-center">{{ item.itemSname }}</div>
                </td>
                <td>
                  <div class="text-center">{{ item.prodNo }}</div>
                </td>
                <td>
                  <div>{{ item.seQty }}</div>
                </td>
                <td>
                  <div>{{ item.needQty }}</div>
                </td>
                <td>
                  <div>{{ item.vendNm }}</div>
                </td>
                <td>
                  <div class="text-center">{{ item.partNo }}</div>
                </td>
                <td>
                  <div class="text-center">{{ item.partNm }}</div>
                </td>
                <td>
                  <div>{{ item.unitQty }}</div>
                </td>
                <td>
                  <div>{{ item.loss }}</div>
                </td>
              </tr>
            </template>
          </tbody>
        </table>
      </div>
      <div class="base-stamp">
        <table cellspacing="0" cellpadding="0" border="0" class="el-table__header table-flow">
          <thead class="has-gutter">
            <tr class="text-left">
              <th><div class="examine-cell">签核角色</div></th>
              <th><div class="examine-cell">审核人员</div></th>
              <th><div class="examine-cell">审核状况</div></th>
              <th><div class="examine-cell">审核意见</div></th>
              <th><div class="examine-cell">审核时间</div></th>
            </tr>
          </thead>
          <tbody>
            <template>
              <tr class="text-left" v-for="(item, index) in applicationForm.qhChkmgrdList" :key="index">
                <td>
                  <div>{{ item.flowDesc }}</div>
                </td>
                <td>
                  <div>{{ item.toUserCname }}</div>
                </td>
                <td>
                  <div>{{ item.chkStatusName }}</div>
                </td>
                <td>
                  <div>{{ item.chkOk }}</div>
                </td>
                <td>
                  <div>{{ item.chkDate }}</div>
                </td>
              </tr>
            </template>
          </tbody>
        </table>
      </div>
      <div class="horizontal-direction horizontal-sign">
        <div class="text-left">总经理签核:</div>
        <div class="sign"></div>
      </div>
    </div>
  </section>
</template>

<script>
module.exports = {
  props: {
    propsForm: {
      type: Object,
    },
  },
  data() {
    return {
      sessionStorageData: JSON.parse(sessionStorage.parameterData),
      applicationForm: {
        detailList: [],
      },
    };
  },
  mounted() {
    this.applicationForm = this.propsForm; //销 毁 单 名-3
  },
};
</script>

<style>
.page {
  margin: auto;
  width: 100%;
  max-width: 297mm;
}
</style>
